package qingke.hibernate;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

import qingke.hibernate.Interceptor.QingkeInterceptor;
import qingke.hibernate.bean.StudentStatus;

public class InterceptorTest {
	public static void main(String[] args) {
		SessionFactory sf = new Configuration().configure().buildSessionFactory();
		Session session = sf.withOptions().interceptor(new QingkeInterceptor()).openSession();
		
		StudentStatus stat = session.get(StudentStatus.class, 200);
		
		System.out.println(stat);
		sf.close();
		
		
	}
}
